package org.hackystat.devcathlon.ui.page.teams.manage;

import org.apache.wicket.behavior.SimpleAttributeModifier;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.hackystat.devcathlon.ui.page.DevcathlonBasePage;

/**
 * Implements the Teams Manage Create page, which allows the 
 * user to add a Devcathlon team.  Teams can only be created for projects
 * the user owns.
 *  
 * the current user. 
 * @author John Ly
 */
public class TeamsManageCreatePage extends DevcathlonBasePage {
  /** Support serialization. */
  private static final long serialVersionUID = 1L; 
  
  /**
   * Creates the TeamsManageCreate page.    
   */
  public TeamsManageCreatePage () {
    // Set the body class attribute to section-1 so that the menubar is correct.
    add(new WebMarkupContainer("body") { 
      private static final long serialVersionUID = 1L;
      @Override
      public boolean isTransparentResolver() { 
        return true; 
        } 
      @Override
      protected void onComponentTag(ComponentTag tag) { 
        tag.put("class","section-2"); 
        }
    }
    );     
    
    // Make the tab corresponding to this page bold.
    get("TeamsCreateLink").add(new SimpleAttributeModifier("class", "selected"));
    
    add(new CreateTeamForm("createTeamForm"));
    
  }
}